
import { createStore,combineReducers } from 'redux'
import {persistReducer,persistStore} from 'redux-persist'
import  {collapsedReducer}  from './reducer/collapsedReducer'
import  {loadingReducer}  from './reducer/loadingReducer'
import storage from 'redux-persist/lib/storage' 


const reducers=combineReducers({
    collapsedReducer,
    loadingReducer
})
const persistConfig={
    key:'root',
    storage
}

const persistedReducer = persistReducer(persistConfig, reducers)
const store = createStore(persistedReducer)

const persistor= persistStore(store)

export {store,persistor} 